package com.client;

import com.client.impl.SmbmsClientIpml;
import com.entity.Smbms_bill;
import com.entity.Smbms_provider;
import com.entity.Smbms_role;
import com.entity.Smbms_user;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Primary;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@Primary
@FeignClient(value = "provider90",fallback = SmbmsClientIpml.class)
public interface SmbmsClient {

    @RequestMapping(value = "/Long",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Smbms_user Long(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/info",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Map<String,Object> info(@RequestParam Map<String,String> pm)throws Exception;

    @RequestMapping(value = "/providerInfo",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Map<String,Object> providerInfo(@RequestParam Map<String,String > mp)throws Exception;

    @RequestMapping(value = "/insert",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int insert(Smbms_bill sb)throws Exception;

    @RequestMapping(value = "/delete",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int delete(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/selectD",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Smbms_bill selectD(@RequestParam Map<String,String> mp )throws Exception;

    @RequestMapping(value = "/update",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int update(Smbms_bill sb)throws Exception;

    @RequestMapping(value = "/pDinfo",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Smbms_provider pDinfo(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/pinsert",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int pinsert(Smbms_provider sp)throws Exception;

    @RequestMapping(value = "/pdelete",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int pdelete(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/pupdate",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int pupdate(Smbms_provider sp)throws Exception;

    @RequestMapping(value = "/srAll",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public List<Smbms_role> srAll()throws Exception;

    @RequestMapping(value = "/suAll",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Map<String,Object> suAll(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/suSelectD",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public Smbms_user suSelectD(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/suDelete",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int suDelete(@RequestParam Map<String,String> mp)throws Exception;

    @RequestMapping(value = "/suInsert",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int suInsert(@RequestBody Smbms_user su)throws Exception;

    @RequestMapping(value = "/suUpdate",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE})
    public int suUpdate(@RequestBody Smbms_user su)throws Exception;
}
